package com.haust.config;

import com.haust.dao.RedisDao;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;

@Configuration
public class HaustBackendItemConfiguration extends HaustAbstractRedisConfiguration {
    /**
     * 基于父类新的模板创建对象
     * @param factory
     * @return
     */
    @Bean
    public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
        return super.redisTemplate(factory);
    }

    /**
     * 基于父类新的模板创建对象
     * @param redisTemplate
     * @return
     */
    @Bean
    public RedisDao redisDao(RedisTemplate<String,Object> redisTemplate){
        return super.redisDao(redisTemplate);
    }
}
